// Copyright (c) ZeroC, Inc.

using Test;

namespace Ice.optional
{
    namespace AMD
    {
        public class Server : TestHelper
        {
            public override void run(string[] args)
            {
                var initData = new InitializationData();
                initData.properties = createTestProperties(ref args);
                using Communicator communicator = initialize(initData);
                communicator.getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
                ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
                adapter.add(new InitialI(), Ice.Util.stringToIdentity("initial"));
                adapter.activate();
                serverReady();
                communicator.waitForShutdown();
            }

            public static Task<int> Main(string[] args) =>
                TestDriver.runTestAsync<Server>(args);
        }
    }
}
